<template>
	<view class="flex-col page">
		<scroll-view scroll-y="true" v-if="list.length>0" style="height:calc(100vh)-40px;" @scrolltolower="loadmore">
			<view class="flex-col group_4" v-for="(item, index) in list" :key="index">
				<view class="collecTitle">
					{{item.name}}
				</view>
				<view class="" v-for="(item,index) in item.list">
				
					<view class="flex-col group_5">
						
						<view class="flex-row group_6" @click="go('/pages/my/collection/collectionArticle?strategyId='+item.strategyId)">
							<image :src="item.strategyItleImage" class="image_5 image_6" />
							<view class="flex-col group_7">
								<!-- <text class="text_2 text"><u-parse :content="item.strategyText"></u-parse></text> -->
								<text class="text_2 text">{{item.strategyTitle}}</u-parse></text>
								
								<view class="flex-row group_8">
									<view class="flex-row">
										<image
											src="https://codefun-proj-user-res-1256085488.cos.ap-guangzhou.myqcloud.com/617a2ca7e4f1450011362b37/62b14c62d02982001153329a/16557868112047196771.png"
											class="image_7" />
										<text class="text_3">{{item.strategyLook}}</text>
									</view>
									<view class="flex-row group_10">
										<image
											src="https://codefun-proj-user-res-1256085488.cos.ap-guangzhou.myqcloud.com/617a2ca7e4f1450011362b37/62b14c62d02982001153329a/16557868112282432770.png"
											class="image_7" />
										<text class="text_4" 
											@click.stop="like">{{item.strategyLike}}</text>
									</view>
									<view class="flex-row group_11" @click.stop="cancel(item,index)">
										<image
											:src="item.collectionStatus ? $IMG_URL+'16557836921572999709.png':$IMG_URL+'16557826699351904721.png' "
											class="image_7" />
										<text class="text_5">{{item.strategyCollection}}</text>
									</view>
								</view>
							</view>
						</view>
					</view>
				</view>
				
			</view>
		</scroll-view>
		<view style="width: 100vw;" v-else>
		<u-empty mode="favor" width="250" marginTop="60%" textSize="30rpx" icon="http://cdn.uviewui.com/uview/empty/data.png">
		</u-empty>
		</view>
		<shop-check-login></shop-check-login>
	</view>
</template>

<script>
	export default {
		components: {},
		data() {
			return {
				list: [],
				id: '',
				strategyLike: '',
				strategyLook: '',
				strategyPubTime: '',
				strategyTitle: '',
				strategyText: '',
				strategyItleImage: '',
				strategyStatus: '',
			};
		},
		created() {
			this.gteCollection();
		},
		methods: {
			// 取消收藏
			// cancel(item,index){
			
				
			// },
			gteCollection() {
				// 获取该文章数据
				this.$http('collection', this.form).then(r => {

					if (r.code == 200) {
						this.list = r.data;
					} else {
						this.$u.toast(r.msg);
					}
				});
			},
			onPullDownRefresh() {
				
				setTimeout(() => {
					this.gteCollection();
					//停止下拉刷新
					uni.stopPullDownRefresh();
					//提示刷新成功
					uni.showToast({
						title: '刷新成功',
						duration: 2500
					});
				}, 2000)

			},
			loadmore(e) {
				
			},
			like(e) {
			
				this.strategyLike = this.strategyLike++;
			}
		},
	};
</script>

<style scoped lang="scss">
	.collecTitle {
		color: #000;
		font-weight: 700;
		font-size: 36rpx;
	}
	.image_5 {
		border-radius: 16rpx;
		width: 180rpx;
		height: 180rpx;
	}

	.image_7 {
		flex-shrink: 0;
		width: 32rpx;
		height: 32rpx;
	}

	.page {
		background-color: #ffffffff;
		width: 100%;
		overflow-y: auto;
		overflow-x: hidden;
		height: 100%;
	}

	.group_4 {
		padding: 29rpx 32rpx 62rpx;
		flex: 1 1 auto;
		overflow-y: auto;
	}

	.text_1 {
		align-self: flex-start;
		color: #191919;
		font-size: 32rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 38rpx;
		font-weight: 600;
	}

	.group_5 {
		margin-top: 42rpx;
		border-bottom: solid 1rpx #eeeeee;
	}

	.group_6 {
		padding-bottom: 32rpx;
		border-bottom: solid 1rpx #eeeeee;
	}

	.group_12 {
		padding: 33rpx 0 32rpx;
		border-bottom: solid 1rpx #eeeeee;
	}

	.group_18 {
		padding: 37rpx 0 32rpx;
		border-bottom: solid 1rpx #eeeeee;
	}

	.group_25 {
		padding: 33rpx 0 32rpx;
	}

	.image_6 {
		flex-shrink: 0;
	}

	.group_7 {
		justify-content: space-around;
		margin-left: 24rpx;
		margin-right: 7rpx;
		flex: 1 1 auto;
	}

	.group_13 {
		margin-left: 24rpx;
	}

	.text_10 {
		align-self: flex-start;
		color: #191919;
		font-size: 32rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 38rpx;
	}

	.group_19 {
		margin-top: 42rpx;
	}

	.group_26 {
		margin-left: 24rpx;
	}

	.text_2 {
		color: #191919;
		font-size: 8rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 33rpx;
		text-align: left;
		overflow: hidden;
	}

	.text {
		display: -webkit-box;
		/*弹性伸缩盒子模型显示*/
		-webkit-box-orient: vertical;
		/*排列方式*/
		-webkit-line-clamp: 3;
		/*显示文本行数(这里控制多少行隐藏)*/
		overflow: hidden;
		/*溢出隐藏*/
	}

	.group_8 {
		margin-top: 82rpx;
	}

	.text_6 {
		align-self: flex-start;
		color: #191919;
		font-size: 28rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 33rpx;
	}

	.group_14 {
		margin-top: 115rpx;
	}

	.image_15 {
		flex-shrink: 0;
	}

	.group_20 {
		margin-left: 24rpx;
		margin-right: 7rpx;
		flex: 1 1 auto;
	}

	.text_15 {
		align-self: flex-start;
		color: #191919;
		font-size: 28rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 33rpx;
	}

	.group_27 {
		margin-top: 115rpx;
	}

	.group_10 {
		margin-left: 47rpx;
	}

	.group_11 {
		margin-left: 48rpx;
	}

	.group_16 {
		margin-left: 47rpx;
	}

	.group_17 {
		margin-left: 48rpx;
	}

	.text_11 {
		color: #191919;
		font-size: 28rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 33rpx;
		text-align: left;
	}

	.group_21 {
		margin-top: 82rpx;
	}

	.group_29 {
		margin-left: 47rpx;
	}

	.group_30 {
		margin-left: 48rpx;
	}

	.text_3 {
		margin-left: 8rpx;
		color: #191919;
		font-size: 24rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 28rpx;
	}

	.text_4 {
		margin-left: 8rpx;
		color: #191919;
		font-size: 24rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 28rpx;
	}

	.text_5 {
		margin-left: 8rpx;
		color: #191919;
		font-size: 24rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 28rpx;
	}

	.text_7 {
		margin-left: 8rpx;
		color: #191919;
		font-size: 24rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 28rpx;
	}

	.text_8 {
		margin-left: 8rpx;
		color: #191919;
		font-size: 24rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 28rpx;
	}

	.text_9 {
		margin-left: 8rpx;
		color: #191919;
		font-size: 24rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 28rpx;
	}

	.group_23 {
		margin-left: 47rpx;
	}

	.group_24 {
		margin-left: 48rpx;
	}

	.text_16 {
		margin-left: 8rpx;
		color: #191919;
		font-size: 24rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 28rpx;
	}

	.text_17 {
		margin-left: 8rpx;
		color: #191919;
		font-size: 24rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 28rpx;
	}

	.text_18 {
		margin-left: 8rpx;
		color: #191919;
		font-size: 24rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 28rpx;
	}

	.text_12 {
		margin-left: 8rpx;
		color: #191919;
		font-size: 24rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 28rpx;
	}

	.text_13 {
		margin-left: 8rpx;
		color: #191919;
		font-size: 24rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 28rpx;
	}

	.text_14 {
		margin-left: 8rpx;
		color: #191919;
		font-size: 24rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 28rpx;
	}
</style>
